<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>教师信息表</title>
    <link href="https://cdn.staticfile.org/twitter-bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet">


</head>
<body>
<div class="container">
    <div class="row clearfix">
        <div class="row">
            <div class="col-md-4 column">
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/teacher/toAddTeacher">添加教师</a>
                <a class="btn btn-primary" href="${pageContext.request.contextPath}/teacher/allTeacher">显示全部教师</a>
            </div>
            <div class="col-md-6 column">
<%--                <form class="form-inline" action="" method="post" style="float: right">--%>
<%--                    <input type="text" name="" class="form-control" placeholder="请输入要查询的教师名称" />--%>
<%--                    <input type="submit" value="查询" class="btn btn-primary" />--%>
<%--                </form>--%>
            </div>
        </div>
    </div>

    <div class="row clearfix">
        <div class="col-md-10 column">
            <table class="table table-hover table-striped">
                <thead>
                <tr>
                    <th>教师号</th>
                    <th>姓名</th>
                    <th>职位</th>
                    <th>性别</th>
                    <th>年龄</th>
                    <th>电话</th>
                    <th>操作</th>
                </tr>
                </thead>
                <!--                foreach-->
                <tbody>
                <c:forEach var="teacher" items="${teacherList}">
                    <tr>
                        <td>${teacher.tid}</td>
                        <td>${teacher.tname}</td>
                        <td>${teacher.postion}</td>
                        <td>${teacher.sex}</td>
                        <td>${teacher.age}</td>
                        <td>${teacher.phone}</td>
                        <td>
                            <a href="${pageContext.request.contextPath}/teacher/toUpdateTeacher?tid=${teacher.tid}">修改</a>
                            &nbsp; | &nbsp;
                            <a href="${pageContext.request.contextPath}/teacher/deleteTeacher?tid=${teacher.tid}">删除</a>
                        </td>
                    </tr>
                </c:forEach>
                </tbody>
            </table>
        </div>
    </div>

</div>

</body>
</html>
